-- --------------------------------------------------------
-- Host:                         127.0.0.1
-- Server version:               5.5.24 - MySQL Community Server (GPL)
-- Server OS:                    Win64
-- HeidiSQL version:             7.0.0.4053
-- Date/time:                    2012-12-18 22:16:25
-- --------------------------------------------------------

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8 */;
/*!40014 SET FOREIGN_KEY_CHECKS=0 */;

-- Dumping database structure for blockme
CREATE DATABASE IF NOT EXISTS `blockme` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `blockme`;


-- Dumping structure for table blockme.blog_settings
DROP TABLE IF EXISTS `blog_settings`;
CREATE TABLE IF NOT EXISTS `blog_settings` (
  `setting_name` varchar(250) NOT NULL,
  `setting_value` varchar(250) NOT NULL,
  KEY `setting_name` (`setting_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- Data exporting was unselected.


-- Dumping structure for table blockme.categories
DROP TABLE IF EXISTS `categories`;
CREATE TABLE IF NOT EXISTS `categories` (
  `categoryid` int(10) NOT NULL AUTO_INCREMENT,
  `categoryname` varchar(250) NOT NULL,
  `slug` varchar(250) NOT NULL,
  `desc` varchar(250) NOT NULL,
  `parentid` int(10) NOT NULL DEFAULT '0',
  `posts_count` int(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`categoryid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- Data exporting was unselected.


-- Dumping structure for table blockme.comments
DROP TABLE IF EXISTS `comments`;
CREATE TABLE IF NOT EXISTS `comments` (
  `commentid` int(10) NOT NULL AUTO_INCREMENT,
  `comment_content` text NOT NULL,
  `postid` int(10) NOT NULL DEFAULT '0',
  `comment_author` varchar(50) NOT NULL DEFAULT '0',
  `comment_email` varchar(50) NOT NULL DEFAULT '0',
  `comment_host` varchar(100) DEFAULT '0',
  `comment_approved` bit(1) NOT NULL,
  `comment_postdate` datetime NOT NULL,
  `comment_postdate_gmt` datetime NOT NULL,
  PRIMARY KEY (`commentid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- Data exporting was unselected.


-- Dumping structure for table blockme.posts
DROP TABLE IF EXISTS `posts`;
CREATE TABLE IF NOT EXISTS `posts` (
  `postid` int(10) NOT NULL AUTO_INCREMENT,
  `title` varchar(255) NOT NULL,
  `authorid` int(11) NOT NULL,
  `content` longtext NOT NULL,
  `publishdate` datetime NOT NULL,
  `publishdate_gmt` datetime NOT NULL,
  `post_status` enum('Published','Draft','Trash') NOT NULL,
  `author_name` varchar(250) NOT NULL,
  `modified_date` datetime DEFAULT NULL,
  `modified_date_gmt` datetime DEFAULT NULL,
  `comment_count` int(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`postid`),
  KEY `AuthorID` (`authorid`),
  KEY `PublishDate` (`publishdate`),
  KEY `AuthorName` (`author_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- Data exporting was unselected.


-- Dumping structure for table blockme.post_relationship
DROP TABLE IF EXISTS `post_relationship`;
CREATE TABLE IF NOT EXISTS `post_relationship` (
  `postid` int(10) NOT NULL,
  `categoryid` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- Data exporting was unselected.


-- Dumping structure for table blockme.tag
DROP TABLE IF EXISTS `tag`;
CREATE TABLE IF NOT EXISTS `tag` (
  `tagid` int(10) NOT NULL AUTO_INCREMENT,
  `tagName` varchar(50) NOT NULL,
  PRIMARY KEY (`tagid`),
  KEY `tagName` (`tagName`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- Data exporting was unselected.


-- Dumping structure for table blockme.tag_relationship
DROP TABLE IF EXISTS `tag_relationship`;
CREATE TABLE IF NOT EXISTS `tag_relationship` (
  `tagid` int(10) NOT NULL,
  `postid` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- Data exporting was unselected.


-- Dumping structure for table blockme.users
DROP TABLE IF EXISTS `users`;
CREATE TABLE IF NOT EXISTS `users` (
  `userid` int(10) NOT NULL AUTO_INCREMENT,
  `user_name` varchar(100) NOT NULL,
  `user_email` varchar(100) NOT NULL,
  `user_password` varchar(64) NOT NULL,
  `user_displayname` varchar(100) NOT NULL,
  `user_token` int(10) unsigned NOT NULL,
  PRIMARY KEY (`userid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- Data exporting was unselected.


-- Dumping structure for table blockme.user_meta
DROP TABLE IF EXISTS `user_meta`;
CREATE TABLE IF NOT EXISTS `user_meta` (
  `userid` int(10) NOT NULL,
  `usser_metakey` varchar(100) NOT NULL,
  `user_metavalue` varchar(100) NOT NULL,
  KEY `userid` (`userid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- Data exporting was unselected.
/*!40014 SET FOREIGN_KEY_CHECKS=1 */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
